<template>
	<div class="cart">
		cart page {{ counter }}
		<button @click="addCounter">+1</button>
		<button @click="getHomeInfo">fetchHomeInfoData</button>
	</div>
</template>

<script setup>
	import { useHomeStore } from '@/store/home'
	import { storeToRefs } from 'pinia'

	const homeStore = useHomeStore()
	console.log('homeStore: ', homeStore)

	const { counter } = storeToRefs(homeStore)

	function addCounter() {
		homeStore.increment()
	}

	function getHomeInfo() {
		homeStore.fetchHomeData()
	}
</script>
